/** \file gpio.h
 **
 ** GPIO driver
 **
 ** History:
 **   -
 *****************************************************************************/
#ifndef _GPIO_H_
#define _GPIO_H_
/*****************************************************************************/
/* Include files                                                             */
/*****************************************************************************/
#include "mcu.h"
#include "base_types_l3.h"


#define GPIO_INPUT     0
#define GPIO_OUTPUT    1

#define   INT01         2
#define   INT02         7
#define   INT05         8
#define   INT14         13

typedef enum exint_type
{
    LLEVEL = 0,
    HLEVEL,
    RISING,
    FALLING
}exint_type_t;


void GPIO_Init(void);
void SetIOPort(int IO, int type);
void WriteIOPort(int IO, int value);
int ReadIOPort(int IO);
boolean_t SetIOInterrupt(uint8_t u8Ch, exint_type_t type, void (*GPIOIntCallback)());
void  ClearIOInterrupt(uint8_t u8Ch);


#endif